import {
  createRouter,
  createWebHistory
} from 'vue-router'

import Home from '@/views/home/index.vue';
import Login from '@/views/login/index.vue';
import Layout from '@/views/layout/index.vue';
import Category from '@/views/category/index.vue';

const router = createRouter({
  history: createWebHistory(
    import.meta.env.BASE_URL),
  routes: [{
      path: '/',
      name: 'Layout',
      component: Layout,
      children: [{
          path: '',
          name: 'Home',
          component: Home
        },
        {
          path: 'Category',
          name: 'Category',
          component: Category
        }
      ]
    },
    {
      path: '/Login',
      name: 'Login',
      component: Login
    },
  ]
})

export default router